<template>
  <div >
    <div class="apshub-header">
        <span>ETB信息比对</span>
    </div>
    <div class="apshub-info">
        <div class="aps-tab">
            <div class="aps-header">
                <span>APS信息</span>
            </div>
            <el-form :model="etbForm" :rules="rules" ref="etbForm" label-width="150px" size="small">
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="命中客户个数" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="ETB标识" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="住宅类型" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="姓名" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="拼音" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="证件号码" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="性别" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="出生日期" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="国籍(国家/地区)代码" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="永久地址" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="第二国籍(国家/地区)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                  <el-row>
                    <el-col :span="24">
                        <el-form-item label="手机号码" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="行业类别" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="年收入(税后)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="职位" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="职级" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="公司名称" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="婚姻状况" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="教育水平" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="单位地址" prop="address">
                        <el-col :span="5">
                            <el-input v-model="etbForm.address.part1" placeholder="第一段"></el-input>
                        </el-col>
                        <el-col class="line" :span="1" style="text-align: center;">-</el-col>
                        <el-col :span="5">
                            <el-input v-model="etbForm.address.part2" placeholder="第二段"></el-input>
                        </el-col>
                        <el-col class="line" :span="1" style="text-align: center;">-</el-col>
                        <el-col :span="5">
                            <el-input v-model="etbForm.address.part3" placeholder="第三段"></el-input>
                        </el-col>
                        <el-col class="line" :span="1" style="text-align: center;">-</el-col>
                        <el-col :span="5">
                            <el-input v-model="etbForm.address.part4" placeholder="第四段"></el-input>
                        </el-col>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="单位地址邮编" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="证件有效期" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="曾用名1姓" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="曾用名1名" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="曾用名1姓(拼音)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="曾用名1名(拼音)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="曾用名2姓" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="曾用名2名" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="曾用名2姓(拼音)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="曾用名2名(拼音)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="住宅地址" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="其它纳税国家代码" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                   <el-row>
                      <el-col :span="24">
                        <el-form-item label="其它纳税国家代码2" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                   </el-row>
                   <el-row>
                    <el-col :span="24">
                        <el-form-item label="其它纳税国家代码3" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                   </el-row>
            </el-form>
        </div>
        <div class="hub-tab">
            <div class="hub-header">
                <span>hub信息</span>
            </div>
             <el-form :model="etbForm" :rules="rules" ref="etbForm" label-width="150px" size="small">
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="命中客户个数" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="ETB标识" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="住宅类型" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="姓名" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="拼音" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="证件号码" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="性别" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="出生日期" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="国籍(国家/地区)代码" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="永久地址" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="第二国籍(国家/地区)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                  <el-row>
                    <el-col :span="24">
                        <el-form-item label="手机号码" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="行业类别" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="年收入(税后)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="职位" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="职级" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="公司名称" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="婚姻状况" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="教育水平" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="单位地址" prop="address">
                        <el-col :span="5">
                            <el-input v-model="etbForm.address.part1" placeholder="第一段"></el-input>
                        </el-col>
                        <el-col class="line" :span="1" style="text-align: center;">-</el-col>
                        <el-col :span="5">
                            <el-input v-model="etbForm.address.part2" placeholder="第二段"></el-input>
                        </el-col>
                        <el-col class="line" :span="1" style="text-align: center;">-</el-col>
                        <el-col :span="5">
                            <el-input v-model="etbForm.address.part3" placeholder="第三段"></el-input>
                        </el-col>
                        <el-col class="line" :span="1" style="text-align: center;">-</el-col>
                        <el-col :span="5">
                            <el-input v-model="etbForm.address.part4" placeholder="第四段"></el-input>
                        </el-col>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="单位地址邮编" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="证件有效期" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="曾用名1姓" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="曾用名1名" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="曾用名1姓(拼音)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="曾用名1名(拼音)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="曾用名2姓" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="曾用名2名" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="曾用名2姓(拼音)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="曾用名2名(拼音)" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                    <el-col :span="24">
                        <el-form-item label="住宅地址" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                 <el-row>
                     <el-col :span="24">
                        <el-form-item label="其它纳税国家代码" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                 </el-row>
                   <el-row>
                      <el-col :span="24">
                        <el-form-item label="其它纳税国家代码2" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                   </el-row>
                   <el-row>
                    <el-col :span="24">
                        <el-form-item label="其它纳税国家代码3" prop="status">
                        <el-input v-model="etbForm.status" disabled></el-input>
                        </el-form-item>
                    </el-col>
                   </el-row>
            </el-form>
        </div>
    </div>
  </div>
</template>

<script>
export default {
 name: 'EtbInfo',
  data() {
    return {
      etbForm: {
        status: '待处理',
        customerNumber: 'CN000123456',
        recommendation: '',
        opinion: '',
        address: {
          part1: '',
          part2: '',
          part3: '',
          part4: ''
        }
      },
      rules: {
        recommendation: [
          { required: true, message: '请输入建议结论', trigger: 'blur' }
        ]
      },
      // 表格数据
      tableData: [],
      // 分页相关
      currentPage: 1,
      pageSize: 10,
      total: 0
    }
  },
  created() {
    this.generateMockData()
  },
  methods: {
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.$message({
            message: '保存成功！',
            type: 'success'
          })
          // 这里可以添加实际的保存逻辑
        } else {
          return false
        }
      })
    },
    resetForm(formName) {
      this.$refs[formName].resetFields()
    },
    // 生成模拟数据
    generateMockData() {
      const mockData = []
      for (let i = 1; i <= 35; i++) {
        mockData.push({
          id: i,
          status: i % 2 === 0 ? '已处理' : '待处理',
          customerNumber: `CN${String(i).padStart(9, '0')}`,
          recommendation: `建议结论${i}`,
          opinion: `意见内容${i}`
        })
      }
      this.total = mockData.length
      this.tableData = mockData.slice(0, this.pageSize)
    },
    // 分页相关方法
    handleSizeChange(val) {
      this.pageSize = val
      this.handleCurrentChange(1)
    },
    handleCurrentChange(val) {
      this.currentPage = val
      const start = (val - 1) * this.pageSize
      const end = start + this.pageSize
      
      // 重新生成模拟数据
      const mockData = []
      for (let i = 1; i <= 35; i++) {
        mockData.push({
          id: i,
          status: i % 2 === 0 ? '已处理' : '待处理',
          customerNumber: `CN${String(i).padStart(9, '0')}`,
          recommendation: `建议结论${i}`,
          opinion: `意见内容${i}`
        })
      }
      this.tableData = mockData.slice(start, end)
    }
  }
}
</script>

<style scoped>
.apshub-header{
    height:40px;
    background-color: #eee;
    line-height: 40px;
    font-size:14px;

}
.apshub-header span{
    padding-left: 10px;
}
.aps-header,.hub-header{
    height:40px;
    background-color: #ddd;
    line-height:40px;
    font-size:14px;
    font-weight:bold;
}
.aps-header,.hub-header span{
    padding-left: 10px;
}
.apshub-info{
     width:100%;
     height:1500px;
     border: 2px solid #ddd;
     display:flex;  
     flex-direction: row;
}
.aps-tab{
    width:50%;
    height:1500px; 
    background-color: #eee;
   
}
.el-row{
     display:flex;
     justify-content: center;  
     align-items: center;
     padding-top: 20px;
     height: 50px;
     padding-right:80px;
}

.hub-tab{
    width:50%;
    height:1500px;
    background-color: #ccc;
}
.line {
  display: flex;
  align-items: center;
  justify-content: center;
}

</style>